FUNCTION

_validate_evm_address

function _validate_evm_address(message: text, signature: signature?, account_auth_descriptor: account_auth_descriptor): byte_array

Verifies that the signer of a certain message is the signer of the single-sig auth descriptor used to authorize this operation.

Throws "INPUT ERROR" if the signature is null

Throws "INVALID SIGNATURE" when the signature verification fails. This might happen if:

  • the message signer is not the one associated with the auth descriptor
  • the message that was signed does not correspond to the one passed in the message parameter

Throws if the message is empty

Parameters

  • message — the message that was signed
  • signature — the signature received. If null, it will throw
  • account_auth_descriptor — the auth descriptor that authorized this operation

Returns

the EVM address that signed the operation's message

© 2024 Chromia